package org.jeecg.modules.yc.netty;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * 服务器加载完成后启动Netty通信框架
 */
/*@Component*/
@Slf4j
public class NettyApplicationRunner implements ApplicationRunner {

    @Autowired
    private NettyServer nettyServer;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        log.info("netty服务启动");
        nettyServer.start();
    }
}
